import time

def desc_time(s):
    def wapper(func):
        name = func.__name__  # 给变量name赋值 确定访问的函数
        func_identify = {name: 0, "second": s}

        def inner(*args, **kwargs):
            use_time = func_identify[name] + func_identify["second"]  # 需等待这些时间之后才可以再次访问

            now_time = time.time()
            # re_time = use_time - now_time  # 这个结果是一个负数
            if now_time > use_time:  # 如果当前时间大于等待的时间
                res = func(*args, **kwargs)
                func_identify[name] = now_time  # 给 func_identify[name] 重新赋值
            else:
                # print("请在{}之后访问".format(re_time))
                res = " "
            return res

        return inner

    return wapper